<form action="{:request()->url()}" autocomplete="off" class="layui-form layui-card" data-auto="true" method="post">
    <div class="layui-card-body padding-left-40">
        <script>
            layui.form.render();
        </script>
        <div class="layui-form-item relative block">
            <span class="color-green font-w7">展示位置</span>
            <span class="color-desc margin-left-5">Type</span>
            <select class="layui-select" lay-search name="type">
                <option value="">--- 展示位置 ---</option>
                {foreach ["首页","商城","员工公告"] as $k => $t}
                {eq name='$data.type|default="0"' value='$k'}
                <option selected value="{$k}">{$t|default=''}</option>
                {else}
                <option value="{$k}">{$t|default=''}</option>
                {/eq}
                {/foreach}
            </select>
        </div>
        <label class="layui-form-item relative block">
            <span class="color-green font-w7">内容</span>
            <span class="color-desc margin-left-5">name</span>
            <input class="layui-input" name="content" placeholder="{$vo.content|default='公告内容'}" value="{$vo.content|default=''}"/>
            <span class="help-block">请填写公告内容，建议字符不要太长，一般24个汉字</span>
        </label>

    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" data-close data-confirm="确定要取消编辑吗？" type='button'>取消编辑</button>
    </div>
</form>